home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
misc
/
borlan32
/
test32.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-09
|
381b
|
29 lines
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
void helloworld(void);
void main(void)
{
char *tbuff;
tbuff = malloc(0x100000); // allocate 1 mega byte
if (tbuff == NULL)
{
printf("Unable to allocate 1 megabyte of memory\n");
exit(1);
}
printf("Hello World! I allocated 1 megabyte at $%lx\n", tbuff);
free(tbuff);
}